import Vue from 'vue'
import VueRouter, { RouteConfig } from 'vue-router'

Vue.use(VueRouter)

const routes: Array<RouteConfig> = [
  {
    path: '/',
    name: 'login',
    component: () => import( '../views/login.vue')
  },
  {
    path: '/Home',
    name: 'Home',

    component: () => import('../views/Home.vue')
  },
  {
    path: '/WarrantyOperation',
    name: 'WarrantyOperation',

    component: () => import('../views/WarrantyOperation.vue')
  },
  {
    path: '/WarrantyMaintain',
    name: 'WarrantyMaintain',

    component: () => import('../views/WarrantyMaintain.vue')
  },
  {
    path: '/InsuranceManage',
    name: 'InsuranceManage',

    component: () => import('../views/InsuranceManage.vue')
  },
  {
    path: '/userWarrantyQuery',
    name: 'userWarrantyQuery',

    component: () => import('../views/userWarrantyQuery.vue')
  },
  {
    path: '/ClientManage',
    name: 'ClientManage',

    component: () => import('../views/ClientManage.vue')
  },
  {
    path: '/userInfoChange',
    name: 'userInfoChange',

    component: () => import('../views/userInfoChange.vue')
  },
  {
    path: '/DeptManage',
    name: 'DeptManage',

    component: () => import('../views/DeptManage.vue')
  },
  {
    path: '/reportForm',
    name: 'reportForm',

    component: () => import('../views/reportForm.vue')
  },
  {
    path: '/LogManage',
    name: 'LogManage',

    component: () => import('../views/LogManage.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
